package com.dlz.systemshop.utils;

import lombok.Data;

@Data
public class ApiResponse<T> {
    private int errno;
    private String errmsg;
    private T data;
    public ApiResponse(){}

    public ApiResponse(int errno, String errmsg, T data) {
        this.errno = errno;
        this.errmsg = errmsg;
        this.data = data;
    }

   public  void oK( String errmsg, T data) {
        this.errno = 0;
        this.errmsg = errmsg;
        this.data = data;
    }

    public  void error( Integer num,String errmsg, T data) {
        this.errno = num;
        this.errmsg = errmsg;
        this.data = data;
    }
}
